home *** CD-ROM | disk | FTP | other *** search
- /*
- Cast Shadow
- Copyright © 1997 by A. Pratsch
-
- - You need a transparent layer. Paint something onto it (e.g. a ball
- or a text)
-
- - Then call this script. It will create a shadowmap for your object
- and then applies it to your painting.
-
- example for the following rexx commands of arteffect: layer,
- createbrush, setcolor, changebrush, circle and rectangle.
- */
-
- options results
-
- address "ArtEffect"
-
- layer stem a.
- say "Active layer: " || a.active
- say "Number of layers: " || a.number
-
- if a.number <= 2 then
- do
- createbrush frompicture
- if rc~=0 then say rc2
- layer append opacity 60 name 'Shadow'
- if rc~=0 then say rc2
-
- if a.number = 1 then
- layer moveto 0
- else
- layer moveto 1
-
- setcolor 0 0 0
- if rc~=0 then say rc2
-
- changebrush handle topleft
- if rc~=0 then say rc2
-
- circle 20 20 3 painttool brush mode color strength 100
- if rc~=0 then say rc2
-
- get stem pinfo. pictureinfo
- rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
- rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
- rectangle 0 0 pinfo.width pinfo.height pt fill mode blur strength 100
-
- if a.number = 1 then
- layer mergewith 2
- else
- layer mergewith 3
- if rc~=0 then say rc2
- end
- else
- requestnotify 'Too many layers!|Unable to cast shadow.'
-
-